package com.tianji.learning.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.tianji.common.domain.dto.PageDTO;
import com.tianji.common.domain.query.PageQuery;
import com.tianji.learning.domain.po.LearningLesson;
import com.tianji.learning.domain.vo.LearningLessonVO;
import com.tianji.learning.domain.vo.LearningPlanPageVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 学生课程表 服务类
 * </p>
 *
 * @author EllieHy
 * @since 2024-05-27
 */
public interface ILearningLessonService extends IService<LearningLesson> {
	
	/**
	 * 将购买的课程添加到用户课程表
	 * @param userId 用户id
	 * @param courseIds 课程id集合
	 */
	void addUserLessons(@Param("userId") Long userId, @Param("courseIds") List<Long> courseIds);
	
	LearningLessonVO queryMyCurrentLesson();
	
	PageDTO<LearningLessonVO> queryMyLessons(PageQuery query);
	
	Long isLessonValid(Long courseId);
	
	LearningLessonVO queryLessonByCourseId(Long courseId);
	
	void deleteCourseFromLesson(Long userId, Long courseId);
	
	void createLearningPlan(Long courseId, Integer freq);
	
	LearningPlanPageVO queryMyPlans(PageQuery query);
}
